home *** CD-ROM | disk | FTP | other *** search
- package javax.swing;
-
- import java.awt.Component;
- import java.awt.Insets;
-
- class GroupLayout$ComponentInfo {
- private Component component;
- GroupLayout.ComponentSpring horizontalSpring;
- GroupLayout.ComponentSpring verticalSpring;
- private GroupLayout.LinkInfo horizontalMaster;
- private GroupLayout.LinkInfo verticalMaster;
- private boolean visible;
- private Boolean honorsVisibility;
- // $FF: synthetic field
- static final boolean $assertionsDisabled = !GroupLayout.class.desiredAssertionStatus();
- // $FF: synthetic field
- final GroupLayout this$0;
-
- GroupLayout$ComponentInfo(GroupLayout var1, Component var2) {
- this.this$0 = var1;
- this.component = var2;
- this.updateVisibility();
- }
-
- public void dispose() {
- this.removeSpring(this.horizontalSpring);
- this.horizontalSpring = null;
- this.removeSpring(this.verticalSpring);
- this.verticalSpring = null;
- if (this.horizontalMaster != null) {
- this.horizontalMaster.remove(this);
- }
-
- if (this.verticalMaster != null) {
- this.verticalMaster.remove(this);
- }
-
- }
-
- void setHonorsVisibility(Boolean var1) {
- this.honorsVisibility = var1;
- }
-
- private void removeSpring(GroupLayout.Spring var1) {
- if (var1 != null) {
- ((GroupLayout.Group)var1.getParent()).springs.remove(var1);
- }
-
- }
-
- public boolean isVisible() {
- return this.visible;
- }
-
- boolean updateVisibility() {
- boolean var1;
- if (this.honorsVisibility == null) {
- var1 = this.this$0.getHonorsVisibility();
- } else {
- var1 = this.honorsVisibility;
- }
-
- boolean var2 = var1 ? this.component.isVisible() : true;
- if (this.visible != var2) {
- this.visible = var2;
- return true;
- } else {
- return false;
- }
- }
-
- public void setBounds(Insets var1, int var2, boolean var3) {
- int var4 = this.horizontalSpring.getOrigin();
- int var5 = this.horizontalSpring.getSize();
- int var6 = this.verticalSpring.getOrigin();
- int var7 = this.verticalSpring.getSize();
- if (!var3) {
- var4 = var2 - var4 - var5;
- }
-
- this.component.setBounds(var4 + var1.left, var6 + var1.top, var5, var7);
- }
-
- public void setComponent(Component var1) {
- this.component = var1;
- if (this.horizontalSpring != null) {
- this.horizontalSpring.setComponent(var1);
- }
-
- if (this.verticalSpring != null) {
- this.verticalSpring.setComponent(var1);
- }
-
- }
-
- public Component getComponent() {
- return this.component;
- }
-
- public boolean isLinked(int var1) {
- if (var1 == 0) {
- return this.horizontalMaster != null;
- } else if (!$assertionsDisabled && var1 != 1) {
- throw new AssertionError();
- } else {
- return this.verticalMaster != null;
- }
- }
-
- private void setLinkInfo(int var1, GroupLayout.LinkInfo var2) {
- if (var1 == 0) {
- this.horizontalMaster = var2;
- } else {
- if (!$assertionsDisabled && var1 != 1) {
- throw new AssertionError();
- }
-
- this.verticalMaster = var2;
- }
-
- }
-
- public GroupLayout.LinkInfo getLinkInfo(int var1) {
- return this.getLinkInfo(var1, true);
- }
-
- private GroupLayout.LinkInfo getLinkInfo(int var1, boolean var2) {
- if (var1 == 0) {
- if (this.horizontalMaster == null && var2) {
- (new GroupLayout.LinkInfo(0)).add(this);
- }
-
- return this.horizontalMaster;
- } else if (!$assertionsDisabled && var1 != 1) {
- throw new AssertionError();
- } else {
- if (this.verticalMaster == null && var2) {
- (new GroupLayout.LinkInfo(1)).add(this);
- }
-
- return this.verticalMaster;
- }
- }
-
- public void clearCachedSize() {
- if (this.horizontalMaster != null) {
- this.horizontalMaster.clearCachedSize();
- }
-
- if (this.verticalMaster != null) {
- this.verticalMaster.clearCachedSize();
- }
-
- }
-
- int getLinkSize(int var1, int var2) {
- if (var1 == 0) {
- return this.horizontalMaster.getSize(var1);
- } else if (!$assertionsDisabled && var1 != 1) {
- throw new AssertionError();
- } else {
- return this.verticalMaster.getSize(var1);
- }
- }
-
- // $FF: synthetic method
- static Component access$000(GroupLayout$ComponentInfo var0) {
- return var0.component;
- }
-
- // $FF: synthetic method
- static GroupLayout.LinkInfo access$1100(GroupLayout$ComponentInfo var0, int var1, boolean var2) {
- return var0.getLinkInfo(var1, var2);
- }
-
- // $FF: synthetic method
- static void access$1200(GroupLayout$ComponentInfo var0, int var1, GroupLayout.LinkInfo var2) {
- var0.setLinkInfo(var1, var2);
- }
- }
-